/* ###################################### */
/* ###     Util Engine, by Kalith    ### */
/* ###################################### */
/*              Event source              */
/*                                        */
/*                                        */

#include "Event.h"
#include "Var.h"

using namespace std;

namespace Util
{
    const Str Event::CLASS_NAME = "Event";

    Event::Event()
    {
    }

    Event::Event( const Str& sName, const Bool& bOncePerFrame )
    {
        sName_ = sName;
        bOncePerFrame_ = bOncePerFrame;
    }

    void Event::SetName( const Str& sName )
    {
        sName_ = sName;
    }

    void Event::SetOncePerFrame( const Bool& bOncePerFrame )
    {
        bOncePerFrame_ = bOncePerFrame;
    }

    void Event::Add( const Var& mValue )
    {
        lArgList_.PushBack(mValue);
    }

    Ptr<const Var> Event::Get( const UInt& uiIndex ) const
    {
        return &lArgList_[uiIndex];
    }

    UInt Event::GetNumParam() const
    {
        return lArgList_.GetSize();
    }

    const Str& Event::GetName() const
    {
        return sName_;
    }

    const Bool& Event::IsOncePerFrame() const
    {
        return bOncePerFrame_;
    }

    Var& Event::operator [] ( const UInt& uiIndex )
    {
        return lArgList_[uiIndex];
    }

    const Var& Event::operator [] ( const UInt& uiIndex ) const
    {
        return lArgList_[uiIndex];
    }
}



